package com.wanlian.netty.File.msg.down;

import com.wanlian.json.JsonStringUtil;
import com.wanlian.netty.File.model.FileHead;
import com.wanlian.netty.File.msg.FileBaseMsg;
import com.wanlian.netty.msg.MsgType;

public class FilePeerDownHeadMsg extends FileBaseMsg {
    private FileHead head;

    public FilePeerDownHeadMsg() {
        this.setType(MsgType.DEVICE_FILE_DOWNLOAD_HEAD);
    }

    public FileHead getHead() {
        return head;
    }

    public void FilePeerDownHeadMsg(FileHead head) {
        this.head = head;
        this.setContent(JsonStringUtil.writeValueAsString(head));
    }

    public void setHead(FileHead head) {
        this.head = head;
        this.setContent(JsonStringUtil.writeValueAsString(head));
    }
}
